package com.pojo;

import lombok.Data;

import javax.validation.constraints.Max;
import javax.validation.constraints.NotBlank;
import javax.validation.constraints.Size;

@Data
public class Teacher {

    @NotBlank(message = "不能为空啊")
    @Size(min = 3,max = 6,message = "不符合要求")
    private String name;
    @Max(value = 100,message = "岁数比较大")
    private int age;
}
